from flask_restful import fields
from libs.helper import TimestampField

base_emoji_pack_fields = {
    "id": fields.String,
    "name": fields.String,
    "agent_id":fields.String,
    "descrip": fields.String,
    "price" :fields.Float(attribute="Price"),
    "created_at": TimestampField,
    "created_by": fields.String,
    "updated_at": TimestampField,
    "updated_by": fields.String,
}

emoji_fields={
    "id":fields.String,
    "name":fields.String,
    "descrip":fields.String,
    "emoji_code":fields.String(attribute="emo_code"),
    "emoji_type":fields.String(attribute="emo_type"),
    "emoji_map":fields.List(fields.String),
    "file_id":fields.String,
    "file_url":fields.String,
    "url":fields.String(attribute="emoji_preview_url"),
    "created_at": TimestampField,
    "created_by": fields.String,
    "updated_at": TimestampField,
    "updated_by": fields.String,
}
emoji_list_fields={
    "total":fields.Integer,
    "has_more":fields.Boolean,
    "data":fields.List(fields.Nested(emoji_fields))
}

emoji_pack_list_fields={
    "total":fields.Integer,
    "has_more":fields.Boolean,
    "data":fields.List(fields.Nested(base_emoji_pack_fields))
}